const border = require('../tw-lib-base/border/props')
const nodata = require('../tw-lib-base/no-data/props')

module.exports = {
  data: {
    type: Array,
    default () {
      return [
        {
          title: '标题1',
          content: '内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容内容1内容1内容1内容1内容1',
          starvalue: 4,
          html: '<span style="color:#218fff">html片段1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1</span>',
          trend: 'down'
        },
        {
          title: '标题2',
          content: '内容2',
          starvalue: 4,
          trend: 'up'
        },
        {
          imgUrl: '{{$twApp.fileBaseUrl}}/图片地址',
          title: '标题3',
          html: '<span style="color:#218fff">html片段</span>'
        },
        {
          index: '4',
          mulcontent: [
            {
              title: '标题2',
              content: '内容2',
              align: 'left',
              trend: 'up'
            },
            {
              title: '标题2',
              content: '内容2',
              trend: 'up'
            },
            {
              title: '标题2',
              content: '内容2',
              trend: 'up'
            }
          ]
        },
        {
          index: '5',
          mulcontent: [
            {
              content: '内容2',
              align: 'left',
              width: '30%',
              trend: ''
            },
            {
              content: '内容2',
              width: '100px',
              trend: 'down'
            },
            {
              content: '内容2',
              trend: 'up'
            }
          ]
        }
      ]
    },
    name: '',
    filedType: 'api'
  },

  columns: {
    type: String,
    default: '',
    name: '列数',
    nameTip: '每行显示多少项',
    filedType: 'string'
  },

  itemBg: {
    type: String,
    default: '#e2e8ee',
    name: '列表项背景色',
    filedType: 'color'
  },
  isColumnBg: {
    type: Boolean,
    default: false,
    name: '启用间隔背景',
    filedType: 'switch'
  },
  itemBg1: {
    type: String,
    default: '#e2e8ee',
    name: '列表项偶数背景',
    filedType: 'color'
  },
  itemHeight: {
    type: String,
    default: '',
    name: '列表项高度',
    filedType: 'string'
  },

  itemSpacing: {
    type: String,
    default: '10px',
    name: '列表项间距',
    filedType: 'string'
  },

  itemPadding: {
    type: String,
    default: '10px',
    name: '项内边距',
    filedType: 'string'
  },

  isColumn: {
    type: Boolean,
    default: true,
    name: '是否垂直排列',
    filedType: 'switch',
    vif: {
      key: 'columns',
      value: ''
    }
  },

  icons: {
    type: Array,
    default () {
      return []
    },
    name: '图标列表',
    filedType: 'file',
    limit: 100,
    maxSize: 1024
  },

  iconWidth: {
    type: String,
    default: '60px',
    name: '图标宽度',
    filedType: 'string'
  },

  iconHeight: {
    type: String,
    default: '60px',
    name: '图标高度',
    filedType: 'string'
  },
  iconBool: {
    type: Boolean,
    default: false,
    name: '限制图标宽度',
    filedType: 'switch'
  },
  iconFontSize: {
    type: String,
    default: '16px',
    name: '排序字体',
    filedType: 'string'
  },
  iconCenter: {
    type: Array,
    default: 'left',
    name: '排序居中显示',
    filedType: 'select',
    options: [
      {
        name: 'left',
        value: 'left'
      },
      {
        name: 'center',
        value: 'center'
      },
      {
        name: 'right',
        value: 'right'
      }
    ]
  },
  indexColor: {
    type: String,
    default: '#000',
    name: '排序字体颜色',
    filedType: 'color'
  },
  iconBgColor: {
    type: String,
    default: '',
    name: '排序背景颜色',
    filedType: 'color'
  },
  iconBdRadius: {
    type: String,
    default: '5px',
    name: '排序圆角',
    filedType: 'string'
  },

  fontFamily: {
    type: Array,
    default: '',
    name: '字体',
    filedType: 'select',
    options: [
      {
        name: '微软雅黑',
        value: 'Microsoft YaHei'
      },
      {
        name: '宋体',
        value: '宋体'
      },
      {
        name: '继承父元素',
        value: 'inherit'
      },
      {
        name: '液晶面板',
        value: 'digiface'
      },
      {
        name: 'Arial',
        value: 'Arial'
      },
      {
        name: 'Helvetica Neue',
        value: 'Helvetica Neue'
      },
      {
        name: 'Helvetica',
        value: 'Helvetica'
      }
    ]
  },

  titleFontSize: {
    type: String,
    default: '14px',
    name: '标题字体大小',
    filedType: 'string'
  },

  titleFontColor: {
    type: String,
    default: '#333333',
    name: '标题字体颜色',
    filedType: 'color'
  },

  familyText: {
    type: String,
    default: 'digiface',
    name: '文本字体类型',
    filedType: 'string'
  },

  desFontSize: {
    type: String,
    default: '14px',
    name: '描述字体大小',
    filedType: 'string'
  },

  desFontColor: {
    type: String,
    default: '#666666',
    name: '描述字体颜色',
    filedType: 'color'
  },

  fontIconSize: {
    type: String,
    default: '14px',
    name: '上升/下降图标大小',
    filedType: 'string'
  },

  upIconColor: {
    type: String,
    default: '#ff3e68',
    name: '上升图标颜色',
    filedType: 'color'
  },

  downIconColor: {
    type: String,
    default: '#0a77f5',
    name: '下降图标颜色',
    filedType: 'color'
  },

  itemBorderRadius: {
    type: String,
    default: '10px',
    name: '圆角尺寸',
    filedType: 'string'
  },

  showImg: {
    type: Boolean,
    default: true,
    name: '显示图片',
    filedType: 'switch'
  },
  showMulText: {
    type: Boolean,
    default: false,
    name: '内容允许换行',
    filedType: 'switch'
  },
  mulTextLine: {
    type: String,
    default: '0',
    name: '内容显示行数',
    filedType: 'string',
    vif: {
      key: 'showMulText',
      value: true
    }
  },
  alignItems: {
    type: Array,
    default: 'flex-start',
    name: '内容区上下居中',
    filedType: 'select',
    options: [
      {
        name: '默认',
        value: 'flex-start'
      },
      {
        name: '居中',
        value: 'center'
      },
      {
        name: '底部对齐',
        value: 'flex-end'
      }
    ]
  },

  showLine: {
    type: Boolean,
    default: false,
    name: '显示分割线',
    filedType: 'switch'
  },
  itemBorderColor: {
    type: String,
    default: '#ccc',
    name: '分割线颜色',
    filedType: 'color'
  },
  itemBorderType: {
    type: Array,
    default: 'solid',
    name: '分割线样式',
    filedType: 'select',
    options: [
      {
        name: '实线',
        value: 'solid'
      },
      {
        name: '虚线',
        value: 'dashed'
      },
      {
        name: '点划线',
        value: 'dotted'
      }
    ]
  },

  letterSpacing: {
    type: String,
    default: '1px',
    name: '评星字间距',
    filedType: 'string'
  },
  letterFontSize: {
    type: String,
    default: '18px',
    name: '评星字体',
    filedType: 'string'
  },

  voidcolor: {
    type: String,
    default: '#C6D1DE',
    name: '评星未选中ICON颜色',
    filedType: 'color'
  },
  showscore: {
    type: Boolean,
    default: false,
    name: '评星显示当前分数',
    filedType: 'switch'
  },
  scoreTpl: {
    type: String,
    default: '{value}分',
    name: '评星分数显示模板',
    filedType: 'string'
  },
  showtext: {
    type: Boolean,
    default: false,
    name: '评星显示辅助文字',
    filedType: 'switch'
  },
  textcolor: {
    type: String,
    default: '#333',
    name: '评星辅助文字颜色',
    filedType: 'color'
  },

  readOnly: {
    type: Boolean,
    default: true,
    name: '评星只读',
    filedType: 'switch'
  },
  disabledvoidcolor: {
    type: String,
    default: '#EFF2F7',
    name: '只读时未选中颜色',
    filedType: 'color'
  },
  allowhalf: {
    type: Boolean,
    default: false,
    name: '评星允许半选',
    filedType: 'switch'
  },
  colors: {
    type: Array,
    default () {
      return [
        '#99A9BF',
        '#F7BA2A',
        '#FF9900'
      ]
    },
    name: '评星调色板',
    nameTip: '图表按此处指定的值循环取色',
    filedType: 'list',
    subType: 'color',
    subDefault: '#2bd3bd',
    max: 3
  },
  allowPage: {
    type: Boolean,
    default: false,
    name: '支持分页显示',
    filedType: 'switch'
  },
  pageSize: {
    type: String,
    default: '3',
    name: '分页页码',
    nameTip: '列表排名项大于该值时不显示图标',
    filedType: 'string',
    vif: {
      key: 'allowPage',
      value: true
    }
  },
  useLazeLoad: {
    type: Boolean,
    default: false,
    name: '使用懒加载',
    filedType: 'switch'
  },
  value: {
    type: Number,
    default: 1,
    name: '懒加载当前页',
    filedType: 'value'
  },

  pageSize: {
    type: Number,
    default: 10,
    name: '懒加载每页行数',
    filedType: 'string'
  },
  useClick: {
    type: Boolean,
    default: false,
    name: '启用选中项目',
    filedType: 'switch'
  },

  showMulCntLine: {
    type: Boolean,
    default: false,
    name: '显示内容区分割线',
    filedType: 'switch'
  },
  mulCntBorder: {
    type: String,
    default: '1px solid #ccc',
    name: '内容区分割线样式',
    filedType: 'string'
  },
  mulCntTop: {
    type: String,
    default: '30%',
    name: '内容区分割线位置',
    filedType: 'string'
  },
  mulCntHeight: {
    type: String,
    default: '20px',
    name: '内容区分割线高度',
    filedType: 'string'
  },

  ...border,
  ...nodata
}
